//
//  FiltrateFirstModel.m
//  TerritoryShopkeeper
//
//  Created by xiaowu on 2017/12/18.
//  Copyright © 2017年 ZDQK. All rights reserved.
//

#import "FiltrateFirstModel.h"

@implementation FiltrateFirstModel

+ (FiltrateFirstModel *)initWithSecondModel:(ClassifySecondModel *)classifySecondModel {
    FiltrateFirstModel *firstModel = [[FiltrateFirstModel alloc] init];
    firstModel.title = classifySecondModel.gtcname;
    firstModel.isShow = NO;
    firstModel.secondList = classifySecondModel.threeclass;
    return firstModel;
}

- (NSString *)getSelectedSecondItem {
    NSString *str = @"";
    for (FiltrateSecondModel *secondModel in self.secondList) {
        if (secondModel.isSelect) {
            str = [NSString stringWithFormat:@"%@,",secondModel.title];
        }
    }
    str = [str substringToIndex:str.length - 1];
    return str;
}

@end
